package com.job.blossom;

/**
 * @author ZJM
 * @version 1.0
 * @since 2022-07-06 14:40:09
 */
public class STN0705 {
    public static void main(String[] args) {

        STN0705.stnExample(4,8,9);


    }

    public static void stnExample(int s , int t, int n){
        int num = s;
        int [][] arr1 = new int[n][n];
        for (int col = n-1; col>=0 ; col--) {
            for (int row = 0; row <= col ; row++) {
                arr1[row][col] = num;
                num++;
                num = num >t?1:num;
            }
        }

        for (int row = 0; row <n ; row++) {
            for (int col = 0; col < n; col++) {
                System.out.print(arr1[row][col] + "\t");
            }
            System.out.println();
        }
    }

}
